<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="/">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
            <fo:layout-master-set>
                <fo:simple-page-master master-name="x" page-height="10in"
                    page-width="8in" margin-top="0.5in" margin-bottom="0.5in"
                    margin-left="1in" margin-right="1in">
                    <fo:region-body margin-top="0.5in"/>
                    <fo:region-before extent="1in"/>
                    <fo:region-after extent=".75in"/>
                </fo:simple-page-master>
            </fo:layout-master-set>

            <fo:page-sequence master-reference="x">
                <fo:static-content flow-name="xsl-region-before">
                    <fo:block font-size="20pt" font-family="sans-serif"
                                line-height="24pt" background-color="cyan"
                                space-after.optimum="15pt" text-align="center"
                                padding-top="3pt">
                         REPORT
                    </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="xsl-region-after">
                    <fo:block font-size="18pt" font-family="sans-serif"
                                line-height="24pt"
                                space-after.optimum="15pt" text-align="left"
                                padding-top="3pt">
                          
                    </fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                    <fo:block font-size="15pt" font-family="sans-serif"
                                line-height="24pt"
                                space-after.optimum="15pt" text-align="center"
                                padding-top="10pt">
                          Cac Tin Moi
                    </fo:block>
                    <fo:block>
                        <fo:table border-collapse="separate" table-layout="fixed">
                            <fo:table-column column-width="1cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="3cm"/>
                            <fo:table-column column-width="3cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">STT</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Nguoi Dang Tin</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Ma Tin Dang</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Loai Tin</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Thoi Gian</fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                                <xsl:for-each select="report/dsTinDangMoi/tindangmoi">
                                    <fo:table-row>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:number level="single" count="tindangmoi"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="nguoidangtin"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="matindang"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="loaitin"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="time"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </xsl:for-each>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                    <fo:block font-size="15pt" font-family="sans-serif"
                                line-height="24pt"
                                space-after.optimum="15pt" text-align="center"
                                padding-top="10pt">
                          Cac Tin Duoc Cap Nhat
                    </fo:block>
                    <fo:block>
                        <fo:table border-collapse="separate" table-layout="fixed">
                            <fo:table-column column-width="1cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="3cm"/>
                            <fo:table-column column-width="3cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">STT</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Nguoi Cap Nhat</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Ma Tin Dang</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Loai Tin</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Thoi Gian</fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                                <xsl:for-each select="report/dsTinDuocUpdate/tinupdate">
                                    <fo:table-row>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:number level="single" count="tinupdate"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="nguoiupdate"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="matindang"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="loaitin"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="time"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </xsl:for-each>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                    <fo:block font-size="15pt" font-family="sans-serif"
                                line-height="24pt"
                                space-after.optimum="15pt" text-align="center"
                                padding-top="10pt">
                          Cac Tin Da Xoa
                    </fo:block>
                    <fo:block>
                        <fo:table border-collapse="separate" table-layout="fixed">
                            <fo:table-column column-width="1cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">STT</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Nguoi Xoa Tin</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Ma Tin Dang</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Thoi Gian</fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                                <xsl:for-each select="report/dsTinDelete/tindelete">
                                    <fo:table-row>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:number level="single" count="tindelete"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="nguoidelete"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="matindang"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="time"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </xsl:for-each>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                    <fo:block font-size="15pt" font-family="sans-serif"
                                line-height="24pt"
                                space-after.optimum="15pt" text-align="center"
                                padding-top="10pt">
                          Cac Tin Da Xoa
                    </fo:block>
                    <fo:block>
                        <fo:table border-collapse="separate" table-layout="fixed">
                            <fo:table-column column-width="1cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-column column-width="4cm"/>
                            <fo:table-body>
                                <fo:table-row>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">STT</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Ma Tin Dang</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">Loai Tin</fo:block>
                                    </fo:table-cell>
                                    <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                        <fo:block text-align="center">So Luot Xem</fo:block>
                                    </fo:table-cell>
                                </fo:table-row>
                                <xsl:for-each select="report/dsTinDuocXem/tinduocxem">
                                    <fo:table-row>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:number level="single" count="tinduocxem"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="matindang"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="loaitin"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-color="blue"
                                                        border-width="0.5pt"
                                                        border-style="solid">
                                            <fo:block text-align="center">
                                                <xsl:value-of select="soluotxem"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </xsl:for-each>
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                </fo:flow>
            </fo:page-sequence>
        </fo:root>
    </xsl:template>

</xsl:stylesheet>
